🖥Необходимо определить делегат и реализовать метод
⏩Итак, вот задание: определить делегат bool CounterHashSetDelegate(int a) и реализовать метод int Function12(HashSet<int> intSet, CounterHashSetDelegate filter), который возвращает количество элементов из intSet, которые удовлетворяют условию filter.
public static class { public delegate bool CounterHashSetDelegate(int a); public static int Function12(HashSet<int> intSet, CounterHashSetDelegate filter) {
int count = 0; foreach (int i in intSet) { if(filter(i)) count++; } return count; } }
⏩Давайте сразу к сути, решение может выглядеть так:
public delegate bool CounterHashSetDelegate(int a);
class Program { static void Main(string[] args) { CounterHashSetDelegate d = IsEvenNum;
🖥Необходимо определить делегат и реализовать метод
⏩Итак, вот задание: определить делегат bool CounterHashSetDelegate(int a) и реализовать метод int Function12(HashSet<int> intSet, CounterHashSetDelegate filter), который возвращает количество элементов из intSet, которые удовлетворяют условию filter.
public static class { public delegate bool CounterHashSetDelegate(int a); public static int Function12(HashSet<int> intSet, CounterHashSetDelegate filter) {
int count = 0; foreach (int i in intSet) { if(filter(i)) count++; } return count; } }
⏩Давайте сразу к сути, решение может выглядеть так:
public delegate bool CounterHashSetDelegate(int a);
class Program { static void Main(string[] args) { CounterHashSetDelegate d = IsEvenNum;
Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.
Unlimited members in Telegram group now
Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.